home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
GSAVE2.ZIP
/
PCXLOAD2.ASM
< prev
next >
Wrap
Assembly Source File
|
1995-12-15
|
2KB
|
124 lines
;Simple PCX loader. No Header Checking cause I hardly have any idea what
;values it holds!
.model small
.stack 100h
.data
picture dw ?
file db 'SCREENGS.PCX',0
.code
mov ax,@data
mov ds,ax
mov ax,4a00h
mov bx,1000
int 21h
mov ax,0013h
int 10h
push 0a000h
pop es
mov ax,4800h
mov bx,1000h
int 21h
mov picture,ax
mov ax,3d00h
lea dx,file
int 21h
jnc file_exists
jmp error
file_exists:
mov bx,ax
mov ax,4202h
xor cx,cx
xor dx,dx
int 21h
sub ax,768
mov cx,dx
mov dx,ax
mov ax,4200h
int 21h
mov ax,3f00h
mov cx,768
xor dx,dx
push ds picture
pop ds
int 21h
mov ax,4200h
xor cx,cx
mov dx,128
int 21h
mov dx,3c8h
xor al,al
out dx,al
inc dx
mov cx,768
xor si,si
load_colors:
lodsb
shr al,2
out dx,al
loop load_colors
pop ds
mov ax,3f00h
mov cx,320*200
xor dx,dx
push ds picture
pop ds
int 21h
xor si,si
xor di,di
pcx_load:
lodsb
cmp al,192
jb single_byte
and al,63
mov cl,al
lodsb
jmp draw_color
single_byte:
mov cl,1
draw_color:
xor ch,ch
rep stosb
cmp di,320*200
jb pcx_load
pop ds
mov ax,3e00h
int 21h
xor ah,ah
int 16h
error:
push es
mov ax,picture
mov es,ax
mov ax,4900h
int 21h
pop es
mov ax,0003h
int 10h
mov ax,4c00h
int 21h
end